<template>
    <div class="city">
        <cityHeader></cityHeader>
        <cityList :hotCities="hotCities" :cities="cities"></cityList>
    </div>
</template>
<script>
import cityHeader from './pages/header.vue'
import cityList from './pages/list.vue'

export default{
    data(){
        return{
            hotCities:[],
            cities:{}
        }
    },
    components:{
        cityHeader,
        cityList
    },
    mounted(){
        this.$http.get('/api/city.json').then(res=>{
           console.log(res)
           let data = res.data.data 
           this.hotCities = data.hotCities
           console.log(data)
           this.cities = data.cities
        })
    }
}
</script>
<style scoped>
.city{
    background: #f5f5f5;
}
</style>
